]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Fix _hideTray() being called recursively
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 14 Sep 2012 17:23:21 +0000 (19:23 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 14 Sep 2012 22:17:44 +0000 (00:17 +0200)
_hideTray() is called by _updateState() when the tray is visible
but should be hidden; however, _updateState() may be called again
from within _hideTray() when releasing the GrabHelper grab, so
unless we update the _trayState variable before that, _hideTray()
will be called a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=682243

js/ui/messageTray.js

index 21687ee06270da3ee6d83a1c49f44e0e919c01e2..f91a010f519b29e83e95ae6db028bc9ee0d871be 100644 (file)
@@ -2071,17 +2071,17 @@ const MessageTray = new Lang.Class({
     },
 
     _hideTray: function() {
-        // Note that we might have entered here without a grab,
-        // which would happen if GrabHelper ungrabbed for us.
-        // This is a no-op in that case.
-        this._grabHelper.ungrab({ actor: this.actor });
-
         this._tween(this.actor, '_trayState', State.HIDDEN,
                     { y: 0,
                       time: ANIMATION_TIME,
                       transition: 'easeOutQuad'
                     });
 
+        // Note that we might have entered here without a grab,
+        // which would happen if GrabHelper ungrabbed for us.
+        // This is a no-op in that case.
+        this._grabHelper.ungrab({ actor: this.actor });
+
         // If we are coming back from the overview, there are no windows
         // to be moved. Just remove the tray from the ctrl+alt+tab list.
         if (!this._desktopClone) {